Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Review Move Icons + LRU Caching For Game Review #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

123epsilon
Copy link

I found a few things that seemed nice from a user perspective so I did a little hacking, this PR is meant to do a few small things:

  1. In chess_review.py it uses a platform specific branch to select the extension for stockfish_path, which closes stockfish_path in chess_review.py assumes .exe extension #5

  2. It changes the book move classification color to be saddlebrown which I personally found to be more appealing, but can be dropped as its a matter of opinion. Similarly, I made a slight change to the "selected" color for the move containers on the right sidebar (to avoid interference with move classification icon visibility), it is now a little darker than the hover color.

  3. Adds small move classification icons next to each move for a subset of move classifications (see the display_classes array in analysis.html. See the image below for an example of how this renders.

  4. I added a --debug flag for developers so that we can more easily switch between dev and "prod" modes for developers.

Screenshot 2024-11-09 at 4 17 49 PM

@123epsilon
Copy link
Author

Just pushed one additional change: previously if refreshing the page or submitting the same PGN data the entire game review computation would run again unnecessarily.

  1. Decorates the core game review functionality with an LRU Cache for better reload time. In theory a production version could also persist analysis results using a database.

@123epsilon 123epsilon changed the title Add review move icons Add Review Move Icons + LRU Caching For Game Review Nov 10, 2024
@123epsilon
Copy link
Author

@LinkAnJarad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stockfish_path in chess_review.py assumes .exe extension
1 participant